package routers

import (
	"device-admin/internal/app/web/controller"
	"device-admin/internal/app/web/middleware"

	"github.com/gin-gonic/gin"
)

func sale(rg *gin.RouterGroup) {
	rg.POST("/reboot", controller.Sale{}.Reboot)                     // 重启97-这个接口跳过中间件
	rg.Use(middleware.Device97OnlineCheck())                         // 97在线检测中间件
	rg.POST("/set-door-status", controller.Sale{}.SetDoorStatus)     // 远程控制电子门锁
	rg.POST("/set-lift-position", controller.Sale{}.SetLiftPosition) // 设置升降盘的位置
	rg.GET("/get-sale-status", controller.Sale{}.GetSaleStatus)      // 获取售卖状态
	rg.POST("/stop-sale", controller.Sale{}.StopSale)                // 停止售卖
	rg.POST("/resume-sale", controller.Sale{}.ResumeSale)            // 恢复售卖
}
